package adminLog

import (
	"grpc.getaway.adminspro.padmins.com/internal/api/module/admin/container"
	"grpc.getaway.adminspro.padmins.com/internal/api/utils/rpc"
	pbAdmin "grpc.getaway.adminspro.padmins.com/pkg/proto/admin"
	"strconv"
)

func Detail(c *container.Context) (interface{}, error) {

	id, _ := strconv.ParseInt(c.Request.ParamsToString("id"), 10, 64)

	req := &pbAdmin.AdminOperationLogDetailReq{
		Id:         id,
		OperaterId: c.Auth.Data.Admin.Id,
	}

	return rpc.GetAdminClient().AdminOperationLogDetail(c.GetContext(), req)
}
